/**
 * @author zhgk
 * @date ${DATE}
 * @decription hello模块的Dao
 **/
package com.yg.ssm.hello.dao;

import com.yg.ssm.hello.model.DemoModel;
import org.apache.ibatis.annotations.*;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;
import java.util.List;

/**
 * Created by Administrator on 2016/8/25.
 */
public interface TempDao {
    @Select("SELECT * FROM demo")
    public List<DemoModel> getDemoModel();

    @Insert("INSERT INTO demo (temp,name,pass) VALUES (#{temp},#{name},#{pass})")
    public void addDemoModel(DemoModel demo);

    @Update("UPDATE demo SET pass=#{pass} WHERE temp=#{temp}")
    public void updateDemoModel(DemoModel demo);

    @Delete("DELETE FROM demo WHERE temp=#{temp}")
    public void delDemoModel(String temp);
}
